home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
showbmp2.zip
/
SHOWBMP2.DOC
< prev
next >
Wrap
Text File
|
1993-03-28
|
5KB
|
93 lines
Documentation For The ShowBMP2 Unit.
Compiled March 28, 1993.
Written By Mike Stone.
The author hereby disclaims all warranties relating to this software,
whether expressed or implied, including without limitation any
implied warranties or merchantability or fitness for a particular
purpose. I will not be liable for any special, incidental, consequential,
indirect, or similar damages due to loss of data/damage to hardware or
any other reason, even if I have been advised of the possibility of
such damages.
Moving right along.. this software is released as freeware and you
are welcome to distribute it to anyone and everyone, and to use it in
your own programs. (And don't worry about annoying "Please Register Me"
messages in the .tpu).
This is the update for Show_BMP.zip, and comes with one new procedure
and one new function.
All the unit does is display 64768 byte bitmapped files in
320x200x256c mode. I was messing around with bitmaps and had this code
around so I thought i'd release it after I saw some messages about
people trying to display bitmaps. Its nothing monumental but it works and
does so fairly fast. Although you won't get the compression you have in
gif's and pcx's, binary's are faster on the display and are much easier to
manipulate. There is one new procedure you can all with show_bmp. Here
are all the procedures together:
1) SetVideoMode (mode:byte);
2) ShowBmp (BitmapToBeShown:string, Fastdisplay:boolean);
3) Fadeout ;
And one function:
1) VGA256Exist:boolean;
I included the SetVideomode procedure just in case you don't know how to
change the video mode to $13 (320x200x256c). Then all you have to do
once you have the correct mode, is call Showbmp with the filename of
the bitmapped you want displayed. So:
SetVideoMode($13);
ShowBmp('Example.bin',false); {Call with the name of the Bmp to show}
Textmode(Co80); {Don't forget this when ending your program!}
Don't try initiating the .bgi drivers and calling ShowBmp! ShowBmp will
probably work with other resolutions other than 320x200, but you'll get a
smaller picture or really screw things up (so do it at your own risk!).
VGA256Exist is a function that will return "true" if the adaptor
supports VGA 256c. It isn't guarenteed to work, but on the few computers
I have tried it on, it has returned the correct results.
As for the new procedure, Fadeout will fade the picture out (obviously!)
and there is also a new feature. When displaying your bitmap, you
can display them the way described above, or this new way:
SetVideoMode($13);
ShowBMP('Example.bin',true);
Textmode(Co80);
You will find the screen write to be extremely quick, and coupled with
the fade, something you can dazzle your friends with (grin). Unfortunately
additional care must be taken to avoid unpleasant situations. Firstly,
using this routine this way, may not work with all adaptors, but should
with most standard models. Next, the double check in the unit to make sure
that Mode $13 has been initiated has been removed, so make sure you
call SetVideoMode.
Now about the actual data files used. They MUST be 64768 bytes long, and
no error checking is made (neither is there any error checking when setting
the video mode to see if the users adapter can handle that mode). I came
across three utilities that can help in making the needed .bin files.
First there is the grab.exe utility that comes with Anivga11.zip.Although
it makes two files they can easily be combined, HOWEVER it seems that the
images they "grab" are sixteen copies of the picture captured (if you
understand what I mean), so although it makes for a nice special effect,
it isn't very useful (thought i'd mention it though in case someone tried
using it). Oh, and also it has a 3 byte .pic header, so that will really
mess things up.
Second I have heard of another grab.exe that makes .bin files (not .pic)
and that should work fine from what I know of it (although I have never
used it myself).
The third program is called intro.exe and comes with a supporting
utility called Gif2Bmp v1.0. I am not sure where I got it from but it
works ideally.
One final note, the Unit was compiled with the $G+ directive, so
it will only run on 286+ CPU's. This was to make the fading routine
work properly (and quickly enough).
Btw.. the unit is now written mainly in Assembly and compiled with
Turbo Pascal 6.0 and, once again, may not display properly on all VGA cards.